home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* File subsystem -- list directory list *)
- (* *)
- (* Copyright 1988, 1990 by H. Roy Engehausen. All rights reserved. *)
- (* This software may be freely distributed and used, but it may not *)
- (* under any circumstances be sold by anyone other than the author. *)
- (* It may be distributed by a commercial company as long as it is *)
- (* for no cost. *)
- (* *)
- (*===========================================================================*)
-
- PROCEDURE list_dir_list;
-
- VAR
- found : BOOLEAN;
- this_fsb : fsb_ptr;
-
- BEGIN;
-
- found := FALSE;
-
- (*-----------------------------------------------------------------------*)
- (* List all the directories *)
- (*-----------------------------------------------------------------------*)
-
- this_fsb := fsb_base;
-
- WHILE this_fsb <> NIL DO
- WITH this_fsb^ DO
- BEGIN;
-
- (*-----------------------------------------------------------------*)
- (* If this guy can't download it, don't bother listing it *)
- (*-----------------------------------------------------------------*)
-
- IF active_tcb^.uid_data.user_class >= fsb_down THEN
- BEGIN;
-
- (*-------------------------------------------------------------*)
- (* If this is the first time through, put out the header *)
- (*-------------------------------------------------------------*)
-
- IF NOT found THEN
- BEGIN;
- send_message(message_direct_head);
- found := TRUE;
- END;
-
- (*-------------------------------------------------------------*)
- (* Put out the name and the description (if one exists) *)
- (*-------------------------------------------------------------*)
-
- IF fsb_desc <> '' THEN
- send_tnc_data_str(LEFT(fsb_name, SIZEOF(fsb_name)) +
- '-- ' + fsb_desc + cr)
- ELSE
- send_tnc_data_str(fsb_name + cr);
-
- (*-------------------------------------------------------------*)
- (* Put out the aliases *)
- (*-------------------------------------------------------------*)
-
- IF fsb_alias <> '' THEN
- send_tnc_data_str(get_message(message_direct_alias) + ' ' +
- fsb_alias + cr);
-
- END;
-
- this_fsb := next_fsb;
-
- END; (*----- End of loop thru all the file control blocks -----------*)
-
- (*-----------------------------------------------------------------------*)
- (* If nothing was ever found, tell user *)
- (*-----------------------------------------------------------------------*)
-
- IF NOT found THEN
- BEGIN;
- send_message(message_no_files_all);
- active_tcb^.error_sw := TRUE;
- EXIT;
- END;
-
- END;